\(\int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 76 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=i a c d x+i b c d x \arctan (c x)+a d \log (x)-\frac {1}{2} i b d \log \left (1+c^2 x^2\right )+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x) \]

[Out]

I*a*c*d*x+I*b*c*d*x*arctan(c*x)+a*d*ln(x)-1/2*I*b*d*ln(c^2*x^2+1)+1/2*I*b*d*polylog(2,-I*c*x)-1/2*I*b*d*polylo
g(2,I*c*x)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4996, 4930, 266, 4940, 2438} \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=i a c d x+a d \log (x)+i b c d x \arctan (c x)-\frac {1}{2} i b d \log \left (c^2 x^2+1\right )+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x) \]

[In]

Int[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4930

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x^n])^p, x] - Dist[b*c
*n*p, Int[x^n*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0
] && (EqQ[n, 1] || EqQ[p, 1])

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4996

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rubi steps \begin{align*} \text {integral}& = \int \left (i c d (a+b \arctan (c x))+\frac {d (a+b \arctan (c x))}{x}\right ) \, dx \\ & = d \int \frac {a+b \arctan (c x)}{x} \, dx+(i c d) \int (a+b \arctan (c x)) \, dx \\ & = i a c d x+a d \log (x)+\frac {1}{2} (i b d) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} (i b d) \int \frac {\log (1+i c x)}{x} \, dx+(i b c d) \int \arctan (c x) \, dx \\ & = i a c d x+i b c d x \arctan (c x)+a d \log (x)+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x)-\left (i b c^2 d\right ) \int \frac {x}{1+c^2 x^2} \, dx \\ & = i a c d x+i b c d x \arctan (c x)+a d \log (x)-\frac {1}{2} i b d \log \left (1+c^2 x^2\right )+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=i a c d x+i b c d x \arctan (c x)+a d \log (x)-\frac {1}{2} i b d \log \left (1+c^2 x^2\right )+\frac {1}{2} i b d \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d \operatorname {PolyLog}(2,i c x) \]

[In]

Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.32

method result size
parts \(a d \left (i c x +\ln \left (x \right )\right )+b d \left (i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-\frac {i \ln \left (c^{2} x^{2}+1\right )}{2}\right )\) \(100\)
derivativedivides \(a d \left (i c x +\ln \left (c x \right )\right )+b d \left (i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-\frac {i \ln \left (c^{2} x^{2}+1\right )}{2}\right )\) \(102\)
default \(a d \left (i c x +\ln \left (c x \right )\right )+b d \left (i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-\frac {i \ln \left (c^{2} x^{2}+1\right )}{2}\right )\) \(102\)
risch \(\frac {\ln \left (i c x +1\right ) b c d x}{2}-\frac {i \ln \left (i c x +1\right ) b d}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right ) b d}{2}+i b d -\frac {\ln \left (-i c x +1\right ) b c d x}{2}+\ln \left (-i c x \right ) a d +i a c d x -a d -\frac {i \ln \left (-i c x +1\right ) b d}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right ) b d}{2}\) \(107\)

[In]

int((d+I*c*d*x)*(a+b*arctan(c*x))/x,x,method=_RETURNVERBOSE)

[Out]

a*d*(I*c*x+ln(x))+b*d*(I*arctan(c*x)*c*x+arctan(c*x)*ln(c*x)+1/2*I*ln(c*x)*ln(1+I*c*x)-1/2*I*ln(c*x)*ln(1-I*c*
x)+1/2*I*dilog(1+I*c*x)-1/2*I*dilog(1-I*c*x)-1/2*I*ln(c^2*x^2+1))

Fricas [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x} \,d x } \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="fricas")

[Out]

integral(1/2*(2*I*a*c*d*x + 2*a*d - (b*c*d*x - I*b*d)*log(-(c*x + I)/(c*x - I)))/x, x)

Sympy [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=i d \left (\int a c\, dx + \int \left (- \frac {i a}{x}\right )\, dx + \int b c \operatorname {atan}{\left (c x \right )}\, dx + \int \left (- \frac {i b \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx\right ) \]

[In]

integrate((d+I*c*d*x)*(a+b*atan(c*x))/x,x)

[Out]

I*d*(Integral(a*c, x) + Integral(-I*a/x, x) + Integral(b*c*atan(c*x), x) + Integral(-I*b*atan(c*x)/x, x))

Maxima [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x} \,d x } \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="maxima")

[Out]

I*a*c*d*x + 1/2*I*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d + b*d*integrate(arctan(c*x)/x, x) + a*d*log(x)

Giac [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x} \,d x } \]

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.64 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.83 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))}{x} \, dx=-\frac {b\,d\,\left (\ln \left (c^2\,x^2+1\right )\,1{}\mathrm {i}-c\,x\,\mathrm {atan}\left (c\,x\right )\,2{}\mathrm {i}\right )}{2}+a\,d\,\left (\ln \left (x\right )+c\,x\,1{}\mathrm {i}\right )-\frac {b\,d\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} \]

[In]

int(((a + b*atan(c*x))*(d + c*d*x*1i))/x,x)

[Out]

a*d*(log(x) + c*x*1i) - (b*d*(log(c^2*x^2 + 1)*1i - c*x*atan(c*x)*2i))/2 - (b*d*(dilog(1 - c*x*1i) - dilog(c*x
*1i + 1))*1i)/2